import {querystring,url} from "./tools.js"
import './header.js'

let id = querystring.parse(window.location.search).id;

$.ajax({
    type:"get",
    url:"/api/films/"+id,
    success:function(data){
        console.log(data);
        $(".film>img").attr("src",url+"/images/"+data.images[0]);
        $("#name").text(data.name);
        $("#ename").text(data.ename);
        $("#type").text(data.type);
        $("#area").text(data.area + "/" +data.time+"分钟");
        $("#upDate").text(data.upDate);
        $("a.button").attr("href","/cinemas.html?filmId="+data._id);
    }
});